/*
 * @(#)IbatisModule.java   08/12/24
 *
 *
 */



package net.learntechnology.examples.ext.stripes;

//~--- non-JDK imports --------------------------------------------------------

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;

import com.ibatis.sqlmap.client.SqlMapClient;

import net.learntechnology.examples.guice.SqlMapClientProvider;

import static com.google.inject.name.Names.*;

/**
 *
 * @author nmaves
 */
public class IbatisModule extends AbstractModule {
	@Override
	protected void configure() {
		bind(SqlMapClient.class).toProvider(SqlMapClientProvider.class).in(Scopes.SINGLETON);
		bindConstant().annotatedWith(named("ibatis.configXml")).to("ibatis/SqlMapConfig.xml");    // from classpath
	}
}
